﻿#ifndef SOUNDRECORDING_H
#define SOUNDRECORDING_H

#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class VideoRecording; }
QT_END_NAMESPACE
struct AVFormatContext;
class QFile;
class CRecordingThread;

class CVideoRecording : public QWidget
{
    Q_OBJECT
public:
    CVideoRecording(QWidget *parent = nullptr);
    ~CVideoRecording();

private slots:
	// 开始结束
    void on_btnStartStop_clicked();
	// 暂停结束
	void on_btnSuspend_clicked();

private:
    void startRecording(bool bIsOpenFile);
	void stopRecording(bool bIscloseFile);
	char* dup_wchar_to_utf8(wchar_t *w);

private:
    Ui::VideoRecording* m_ui;
	AVFormatContext* m_pFmtCtx;
	QFile* m_pFile;
	CRecordingThread* m_pThread;
};
#endif // SOUNDRECORDING_H
